<style>
.btn.btn-success-o{
    background: #fff;
    border: 1px solid #FF4444;
    color: #FF4444;
}
.btn.btn-success-o.active{
    background: #FF4444;
    border: 1px solid #FF4444;
    color: #fff;
}
.btn.btn-success-o.active .subtitle{
    color: #f2f2f2;
}
</style>
<div class='fui-page fui-page-current'>
    <div class="fui-header">
		<div class="fui-header-left">
			<a class="back" ng-click="goback()"></a>
		</div>
		<div class="title">账户充值</div> 
		<div class="fui-header-right">&nbsp;</div>
    </div>
    <div class="fui-content">
		<div class='fui-cell-group' style="margin-top:0">
			<div class='fui-according'>
				<div class='fui-according-header' style="color: #666;line-height:1.2rem;padding-left:0.6rem">
					<span class='bold'>充值活动</span>
					<div style="font-size:0.65rem;color:#666;line-height:1.2rem;padding-left:1rem">
						<span class='bold'>单笔充值 <span class='text-danger'>{{pagedata.setting.fee}}</span> 元;</span>
						</br>1、赠送店内消费余额<span class='text-danger'>{{pagedata.setting.fee}}</span>元；
						</br>2、获得分红权限；每天营业额的<span class='text-danger'>{{pagedata.setting.orderfee_rate2||pagedata.setting.orderfee_rate}}</span>%的加权分红！
						<!--</br>3、获得分享推广奖励：
						<span ng-repeat="yv in pagedata.setting.yao_set">推广会员充值<span class='text-danger'>{{yv.minfee}}~{{yv.maxfee}}</span>，个人每次提高分红上限<span class='text-danger'>{{yv.redfee}}</span>元、菜金账户增加<span class='text-danger'>{{yv.onefee}}</span>元；</span>
						</br>4、获得推广加速分红：每推广的下线充值一次，增加<span class='red'>0.5</span>个分红资格，购买多份的按总分红额加速，直至最终分红完毕。
						</br>5、获得贡献奖励：-->
						<span ng-repeat="item in pagedata.setting.g_set">累计推广金额达<span class='red'>{{item.manfee}}</span>元，尊享营业额<span class='text-danger'>{{item.redrate2 || item.redrate}}</span>%分红；</span>
					</div>
				</div>
			</div>
		</div>
		<div style="padding:0 0.5rem">
		<div class="fui-icon-group noborder col-3" style="margin-top:0.5rem">
			<div ng-repeat="item in pagedata.redfeeset" ng-click="pagedata.item.money=item.fee;pagedata.item.key=$index" class="fui-icon-col-sm" style="margin:0;padding:0 0.2rem">
					<div ng-class="{'btn btn-success-o':1,'active':pagedata.item.money==item.fee}" style="line-height:1.4;margin:0;padding:0.3rem;width:100%">
					<div class="bold">￥{{item.fee}}</div>
					<div class="subtitle" style="font-size:12px;">分红额 ￥{{item.redfee}}</div>
					<div class="subtitle" style="font-size:12px;">资格 {{item.rednum}}个</div>
					</div>
			</div>
		</div>
		<div class='fui-cell-group'>
			<div class='fui-cell'>
				<div class='fui-cell-label'>当前余额</div>
				<div class='fui-cell-info c000 bold' style="font-size:1rem">￥{{pagedata.item.credit2}}</div>
			</div>
			<div class='fui-cell'>
				<div class='fui-cell-label'>充值金额</div>
				<div class="fui-cell-info c000 bold" style="font-size:1rem">￥{{pagedata.item.money}}</div>
			</div>
		</div>
		</div>
		<a href="javascript:;" class='btn btn-success block' style="border-radius:1rem;line-height: 3;margin-top:1rem" ng-click="pagedata.recharge()">确认充值</a>
		<a href="javascript:;" class='btn btn-gray block' style="border-radius:1rem;line-height: 3;" ng-click="access_json('jy_caifee/index/')">返回中心</a>
</div>
<script>
scope.pagedata.recharge=function(){
	scope.post_json('//recharge/',scope.pagedata.item,function(pay_id){
		console.log('pay_id');console.log(pay_id);
		scope.tool.pay(pay_id,function(res){
				console.log('收到支付结果！');
				if(res.type=='success'){
					scope.message('充值成功！','','jy_caifee/index/');
				}else{
					scope.message('充值失败！'+res.message,'','jy_caifee/index/');
				}
		},'','','jy_caifee/index/');
	});
}
</script>